package com.yenroc.invoice.pojo;

import com.yenroc.invoice.annotations.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 数字化电子发票（不动产经营租赁服务）发票明细实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Schema(description = "数字化电子发票（不动产经营租赁服务）发票明细实体类")
public class ImmovableLeaseInvoiceDetailDTO {

    @Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "发票项目名称不可为空")
    private String goodsName;

    @Schema(description = "产权证书/不动产权证号")
    private String realEstateWarrantNumber;

    @Schema(description = "不动产地址")
    private String realEstateAddress;

    @Schema(description = "租赁期起止")
    private String theLeaseTermBeginsAndEnds;

    @Schema(description = "跨地（市）标志")
    private String crossRegionIdentifier;

    @Schema(description = "面积单位")
    private String goodsUnit;

    @Schema(description = "数量, 数量、单价应同时为空或同时不为空")
    @NotNull(message = "数量不可为空", groups = UnitAndQuantity.class)
    private BigDecimal goodsQuantity;

    @Schema(description = "单价, 数量、单价应同时为空或同时不为空")
    @NotNull(message = "单价不可为空", groups = UnitAndQuantity.class)
    private BigDecimal goodsPrice;

    @Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "金额不可为空")
    private BigDecimal goodsTotalPrice;

    @Schema(description = "税率/征收率", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "税率/征收率不可为空")
    private BigDecimal goodsTaxRate;

    @Schema(description = "税额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "商品总税额不可为空")
    private BigDecimal goodsTax;

    @Schema(description = "含税总额")
    private BigDecimal totalTaxIncludedAmount;

    @Schema(description = "税种分类代码")
    private String taxClassificationCode;

    @Schema(description = "优惠标志")
    private String PreferentialPolicy;

    interface UnitAndQuantity {
    }


}